/*****************************************************************************
 * Copyright (C) Stacy Curl. All rights reserved.                            *
 * ------------------------------------------------------------------------- *
 * The software in this package is published under the terms of the BSD      *
 * style license a copy of which has been included with this distribution in *
 * the LICENSE.txt file.                                                     *
 *****************************************************************************/
package picounit.verify.constraint;

import picounit.features.verify.constraint.ComparesTo;
import picounit.features.verify.constraint.EqualToComparitor;
import picounit.features.verify.constraint.GreaterThanComparitor;
import picounit.features.verify.constraint.LessThanComparitor;
import picounit.features.verify.constraint.OrComparitor;

public abstract class ComparableToTest extends EqualToTest {
	protected ComparesTo greaterThan(Object greaterThan) {
		return new ComparesTo(greaterThan, nullModifier(), new GreaterThanComparitor());
	}

	protected ComparesTo greaterThanOrEqualTo(Object greaterThanOrEqualTo) {
		return new ComparesTo(greaterThanOrEqualTo, nullModifier(),
			new OrComparitor(new GreaterThanComparitor(), new EqualToComparitor()));
	}

	protected ComparesTo lessThan(Object lessThan) {
		return new ComparesTo(lessThan, nullModifier(), new LessThanComparitor());
	}

	protected ComparesTo lessThanOrEqualTo(Object lessThanOrEqualTo) {
		return new ComparesTo(lessThanOrEqualTo, nullModifier(), 
			new OrComparitor(new LessThanComparitor(), new EqualToComparitor()));
	}
}
